package test.a;

import pool3.ThreadPool;

public class D implements Runnable{
	String url = null;
	int id = 0 ;
	public D(String url,int id) {
		this.url = url;
		this.id = id ;
	}

	@Override
	public void run() {
		//callback(HttpUtils.get(url));
		callback("D ["+id+"] " + this.toString());
	}

	void callback(String html) {
	}

	public static void main(String[] args) {
		ThreadPool threadpoolmanager = ThreadPool.getThreadPool(D.class);
		add(threadpoolmanager);
		threadpoolmanager.commit();
		threadpoolmanager.exit();
	}
	static int idIndex = 0;
	private static void add(final ThreadPool threadpoolmanager) {
		threadpoolmanager.addTask(new D("http://v.qq.com",++ idIndex) {
			void callback(String html) {
				//SysLog.o("q.qq.html", html, false);
				System.out.println(html);
			}
		});
	}
	
}
